/**
 * 转字Date字符串
 * @param {*} date
 */
export function dateToDateStr(date) {
  if (!date) {
    return ''
  }
  const y = date.getFullYear()
  let m = date.getMonth() + 1
  m = m < 10 ? ('0' + m) : m
  let d = date.getDate()
  d = d < 10 ? ('0' + d) : d
  return y + '-' + m + '-' + d
}
export function creat_yyyyMMddHHmmss(val) {
  const newDate = new Date(val)
  const year = newDate.getFullYear()
  const month = newDate.getMonth() + 1 < 10 ? '0' + (newDate.getMonth() + 1) : newDate.getMonth() + 1
  const day = newDate.getDate() < 10 ? `0${newDate.getDate()}` : newDate.getDate()
  const hours = newDate.getHours() < 10 ? `0${newDate.getHours()}` : newDate.getHours()
  const minutes = newDate.getMinutes()
  // const seconds = newDate.getSeconds()
  return `${year}-${month}-${day} ${hours}:${minutes}`
}
export function pager_info() {
  const pager = {
    total: 0,
    pageindex: 1,
    pagesize: 10
  }
  return pager
}
